home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
dev
/
misc
/
gms_e.lha
/
GMSDev
/
EModules
/
graphics
/
screens.e
< prev
next >
Wrap
Text File
|
1997-09-15
|
5KB
|
120 lines
/*
** $VER: screens.e V0.8B
**
** Screen Definitions.
**
** (C) Copyright 1996-1997 DreamWorld Productions.
** All Rights Reserved
*/
OPT MODULE
OPT EXPORT
OPT PREPROCESS
MODULE 'gms/dpkernel','graphics/blitter','system/register'
/****************************************************************************
** Screen object.
*/
CONST SCRVERSION = 1,
TAGS_SCREEN = $FFFB0000 OR ID_SCREEN
OBJECT screen
head[1] :ARRAY OF head
memptr1 :LONG -> Ptr to screen 1
memptr2 :LONG -> Ptr to screen 2 (double buffer)
memptr3 :LONG -> Ptr to screen 3 (triple buffer)
screenlink :LONG -> Ptr to a linked screen
palette :LONG -> Ptr to the screen palette
rasterlist :LONG -> Ptr to a rasterlist
amtcolours :LONG -> The amount of colours in the palette.
scrwidth :INT -> The width of the visible screen
scrheight :INT -> The height of the visible screen
picwidth :INT -> The width of the picture in pixels.
picbytewidth :INT -> The width of the picture in bytes.
picheight :INT -> The height of the entire screen
planes :INT -> The amount of planes in da screen
scrxoffset :INT -> Hardware co-ordinate for TOS
scryoffset :INT -> Hardware co-ordinate for LOS
picxoffset :INT -> Offset of the horizontal axis
picyoffset :INT -> Offset of the vertical axis
attrib :LONG -> Special Attributes are?
scrmode :INT -> What screen mode is it?
scrtype :INT -> Interleaved/Planar/Chunky?
task :LONG -> R: Task that owns this screen.
planesize :LONG -> R: Size of a plane (bytewidth*height).
bitmap :PTR TO bitmap
ENDOBJECT
CONST BUFFER1 = 8,
BUFFER2 = 12,
BUFFER3 = 16
-> SCREEN ATTRIBUTES (attrib)
CONST DBLBUFFER = $00000001, -> For double buffering
TPLBUFFER = $00000002, -> Triple buffering!!
PLAYFIELD = $00000004, -> Set if it's part of a playfield
HSCROLL = $00000008, -> Gotta set this to do scrolling
VSCROLL = $00000010, -> For vertical scrolling
SPRITES = $00000020, -> Set this if you want sprites
SBUFFER = $00000040, -> Creates a scroll buff for up to 100 screens.
CENTRE = $00000080, -> Centres the screens (sets XOffset/YOffset).
BLKBDR = $00000100, -> Gives a blackborder on AGA machines
NOSCRBDR = $00000200 -> For putting sprites in the border
-> SCREEN TYPES (type)
CONST INTERLEAVED = 1, -> These are actual numbers, not bits.
ILBM = 1,
PLANAR = 2,
CHUNKY8 = 3,
CHUNKY16 = 4,
TRUECOLOUR = 5
-> SCREEN MODES (mode)
CONST HIRES = $0001, -> High resolution
SHIRES = $0002, -> Super-High resolution
LACED = $0004, -> Interlaced
LORES = $0008, -> Low resolution (default)
EXTRAHB = $0010, -> Extra HalfBrite
SLACED = $0020, -> Super-Laced resolution.
HAM = $0040 -> For HAM mode
#define WAITLINE(a) Shl(00,16) OR (a),0
#define COLOUR(a,b) Shl(02,16),(a),(b),0
#define NEWPALETTE(a,b,c) Shl(04,16),(a),(b),(c),0
#define COLOURLIST(a,b,c,d) Shl(06,16) OR (a),Shl(b,16) OR (c),(d),0
#define SPRITE(a) Shl(08,16) OR (a),0
#define SCROLL(a,b,c) Shl(10,16) OR (a),Shl(b,16) OR (c),0
#define FSCROLL(a,b,c,d) Shl(12,16) OR (a),Shl(b,16) OR (c),Shl(d,16),0
#define FLOOD Shl(14,16),0
#define REPOINT(a) Shl(16,16),(a),0
#define MIRROR Shl(18,16),0
#define RASTEND $ffffffff
/* Screen tags */
CONST GSA_MEMPTR1 = TAPTR OR 12,
GSA_MEMPTR2 = TAPTR OR 16,
GSA_MEMPTR3 = TAPTR OR 20,
GSA_SCREENLINK = TAPTR OR 24,
GSA_PALETTE = TAPTR OR 28,
GSA_RASTERLIST = TAPTR OR 32,
GSA_AMTCOLOURS = TLONG OR 36,
GSA_SCRWIDTH = TWORD OR 40,
GSA_SCRHEIGHT = TWORD OR 42,
GSA_PICWIDTH = TWORD OR 44,
GSA_PICBYTEWIDTH = TWORD OR 46,
GSA_PICHEIGHT = TWORD OR 48,
GSA_PLANES = TWORD OR 50,
GSA_SCRXOFFSET = TWORD OR 52,
GSA_SCRYOFFSET = TWORD OR 54,
GSA_PICXOFFSET = TWORD OR 56,
GSA_PICYOFFSET = TWORD OR 58,
GSA_SCRATTRIB = TLONG OR 60,
GSA_SCRMODE = TWORD OR 64,
GSA_SCRTYPE = TWORD OR 66